//对外暴露配置路由(常量路由):全部用户都可以访问到的路由
export const constantRoute = [
  {
    //登录
    path: "/login",
    component: () => import("@/views/login/index.vue"),
    name: "login",
    meta: {
      title: "登录", //菜单标题
      hidden: true, //代表路由标题在菜单中是否隐藏  true:隐藏 false:不隐藏
      icon: "Promotion", //菜单文字左侧的图标,支持element-plus全部图标
    },
  },

  {
    //登录成功以后展示数据的路由
    path: "/",
    component: () => import("@/layout/index.vue"),
    name: "layout",
    redirect: "/home",
    meta: {
      hidden: false,
      icon: "HomeFilled",
    },
    children: [
      {
        path: "/home",
        component: () => import("@/views/home/index.vue"),
        meta: {
          title: "首页",
          hidden: false,
          icon: "HomeFilled",
          roles: ["LIBRARY_ROOT", "ADMIN", "OPERATOR"],
          requiresAuth: true,
        },
      },
    ],
  },
  {
    path: "/settings",
    component: () => import("@/layout/index.vue"),
    name: "settings",
    redirect: "/settings/user",
    meta: {
      title: "系统设置",
      hidden: false,
    },
    children: [
      {
        path: "user",
        component: () => import("@/views/user/index.vue"),
        name: "user",
        meta: {
          title: "用户管理",
          hidden: false,
          roles: ["LIBRARY_ROOT", "ADMIN"],
          requiresAuth: true,
        },
      },
      {
        path: "OChours",
        component: () => import("@/views/OChours/index.vue"),
        name: "OChours",
        meta: {
          title: "开闭馆时间",
          hidden: false,
          roles: ["ADMIN", "LIBRARY_ROOT"],
          requiresAuth: true,
        },
      },
      {
        path: "library",
        component: () => import("@/views/Library/index.vue"),
        name: "Library",
        meta: {
          title: "图书馆管理",
          hidden: false,
          icon: "Notebook",
          roles: ["LIBRARY_ROOT"],
          requiresAuth: true,
        },
      },
    ],
  },

  {
    path: "/config",
    component: () => import("@/layout/index.vue"),
    name: "config",
    redirect: "/config/book",
    meta: {
      title: "数据配置",
      hidden: false,
    },
    children: [
      {
        path: "book",
        component: () => import("@/views/Book/index.vue"),
        name: "Book",
        meta: {
          title: "图书管理",
          hidden: false,
          roles: ["ADMIN", "OPERATOR"],
          requiresAuth: true,
        },
      },
      {
        path: "shelf",
        component: () => import("@/views/BookShelf/index.vue"),
        name: "Shelf",
        meta: {
          title: "书架",
          hidden: false,
          roles: ["ADMIN"],
          requiresAuth: true,
        },
      },
      {
        path: "group",
        component: () => import("@/views/BookShelf/group.vue"),
        name: "Group",
        meta: {
          title: "组书架",
          hidden: false,
          roles: ["ADMIN"],
          requiresAuth: true,
        },
      },
      {
        path: "standard",
        component: () => import("@/views/BookShelf/standard.vue"),
        name: "Standard",
        meta: {
          title: "书架规格",
          hidden: false,
          roles: ["ADMIN"],
          requiresAuth: true,
        },
      },
      {
        path: "bookshelfToChina",
        component: () => import("@/views/bookshelfToChina/index.vue"),
        name: "bookshelfToChina",
        meta: {
          title: "书架对应中图法",
          hidden: false,
          roles: ["ADMIN"],
          requiresAuth: true,
        },
      },
      // {
      //   path: "binding",
      //   component: () => import("@/views/Robot/Binding.vue"),
      //   name: "Binding",
      //   meta: {
      //     title: "机器人状态",
      //     hidden: false,
      //     roles: ["ADMIN"],
      //     requiresAuth: true,
      //   },
      // },
      {
        path: "status",
        component: () => import("@/views/Robot/Status.vue"),
        name: "Status",
        meta: {
          title: "盘点机器人配置",
          hidden: false,
          roles: ["ADMIN"],
          requiresAuth: true,
        },
      },
      {
        path: "agv",
        component: () => import("@/views/reutrn-box/agv.vue"),
        name: "agv",
        meta: {
          title: "图书托运机器人配置",
          hidden: false,
          requiresAuth: true,
        },
      },
      {
        path: "returnbox",
        component: () => import("@/views/reutrn-box/returnbox.vue"),
        name: "returnbox",
        meta: {
          title: "智能还书箱配置",
          hidden: false,
          requiresAuth: true,
        },
      },
      {
        path: "robotMarker",
        component: () => import("@/views/Robot/Marker.vue"),
        name: "Marker",
        meta: {
          title: "Marker管理",
          hidden: false,
          roles: ["ADMIN"],
          requiresAuth: true,
        },
      },
    ],
  },

  {
    path: "/workorder",
    component: () => import("@/layout/index.vue"),
    name: "workorder",
    redirect: "/workorder/order",
    meta: {
      title: "工单管理",
      hidden: false,
    },
    children: [
      {
        path: "/workorder/misplacedbook",
        component: () => import("@/views/WorkOrder/MisplacedBook/index.vue"),
        name: "misplacedbook",
        meta: {
          title: "错架图书数据",
          hidden: false,
          roles: ["ADMIN"],
          requiresAuth: true,
        },
      },
      {
        path: "/workorder/order",
        component: () => import("@/views/WorkOrder/order/index.vue"),
        name: "order",
        meta: {
          title: "工单管理",
          hidden: false,
          roles: ["ADMIN"],
          requiresAuth: true,
        },
      },
    ],
  },

  // {
  //   path: "/",
  //   component: () => import("@/layout/index.vue"),
  //   redirect: "Integration",
  //   name: "Integration",
  //   meta: {
  //     title: "首页",
  //     hidden: false,
  //   },
  //   children: [
  //     {
  //       path: "/Integration",
  //       component: () => import("@/views/Integration/index.vue"),
  //       name: "Integration",
  //       meta: {
  //         title: "集成管理",
  //         hidden: false,
  //         roles: ["LIBRARY_ROOT"],
  //         requiresAuth: true,
  //       },
  //     },
  //   ],
  // },

  {
    path: "/inventory",
    component: () => import("@/layout/index.vue"),
    name: "Inventory",
    redirect: "/inventory/route",
    meta: {
      title: "作业管理",
      hidden: false,
    },
    children: [
      {
        path: "/inventory/Route",
        component: () => import("@/views/Inventory/Route/index.vue"),
        name: "ROUTE",
        meta: {
          title: "盘点路线",
          hidden: false,
          roles: ["ADMIN", "OPERATOR"],
          requiresAuth: true,
        },
      },
      {
        path: "/inventory/Time",
        component: () => import("@/views/Inventory/Time/index.vue"),
        name: "TIME",
        meta: {
          title: "盘点时间",
          hidden: false,
          roles: ["ADMIN", "OPERATOR"],
          requiresAuth: true,
        },
      },
      {
        path: "/inventory/task",
        component: () => import("@/views/Inventory/Task/index.vue"),
        name: "Task",
        meta: {
          title: "作业管理",
          hidden: false,
          roles: ["ADMIN", "OPERATOR"],
          requiresAuth: true,
        },
      },
      {
        path: "/inventory/Plan",
        component: () => import("@/views/Inventory/InvPlan/index.vue"),
        name: "Plan",
        meta: {
          title: "预约盘点",
          hidden: false,
          roles: ["ADMIN", "OPERATOR"],
          requiresAuth: true,
        },
      },
      {
        path: "/inventory/returnTask",
        component: () => import("@/views/reutrn-box/returnTask.vue"),
        name: "returnTask",
        meta: {
          title: "还书任务",
          hidden: false,
          roles: ["ADMIN", "OPERATOR"],
          requiresAuth: true,
        },
      },
    ],
  },

  {
    path: "/report",
    component: () => import("@/layout/index.vue"),
    redirect: "/report/wrong",
    name: "Report",
    meta: {
      title: "报表管理",
      hidden: false,
      icon: "Document",
    },
    children: [
      {
        path: "/report/Censored",
        component: () => import("@/views/Censored/index.vue"),
        name: "Censored",
        meta: {
          title: "舆情图书",
          hidden: false,
          roles: ["ADMIN", "OPERATOR"],
          requiresAuth: true,
        },
      },
      {
        path: "/report/ocrBook",
        component: () => import("@/views/ocrBook/index.vue"),
        name: "ocrBook",
        meta: {
          title: "视觉名称管理",
          hidden: false,
          roles: ["ADMIN", "OPERATOR"],
          requiresAuth: true,
        },
      },
      {
        path: "/report/wrong",
        component: () => import("@/views/Report/Wrong/index.vue"),
        name: "Wrong",
        meta: {
          title: "绝对错架检测报表",
          hidden: false,
          icon: "Document",
          roles: ["ADMIN", "OPERATOR"],
          requiresAuth: true,
        },
      },
      {
        path: "/report/Judgmentwrong",
        component: () => import("@/views/Report/JudgmentWrong/index.vue"),
        name: "Judgment",
        meta: {
          title: "法序错架判定报表",
          hidden: false,
          icon: "Document",
          roles: ["ADMIN", "OPERATOR"],
          requiresAuth: true,
        },
      },
      {
        path: "/report/bookRS",
        component: () => import("@/views/Report/BookRS/index.vue"),
        name: "BookRS",
        meta: {
          title: "图书遗失报表",
          hidden: false,
          icon: "Document",
          roles: ["ADMIN", "OPERATOR"],
          requiresAuth: true,
        },
      },
      {
        path: "/report/reportShelf",
        component: () => import("@/views/Report/Shelf/index.vue"),
        name: "ReportShelf",
        meta: {
          title: "在架图书报表",
          hidden: false,
          icon: "Document",
          roles: ["ADMIN", "OPERATOR"],
          requiresAuth: true,
        },
      },
      {
        path: "/report/BookDiff",
        component: () => import("@/views/Report/BookDiff/index.vue"),
        name: "BookDiff",
        meta: {
          title: "图书差异报表",
          hidden: false,
          icon: "Document",
          roles: ["ADMIN", "OPERATOR"],
          requiresAuth: true,
        },
      },
      {
        path: "/report/Change",
        component: () => import("@/views/Report/Change/index.vue"),
        name: "Change",
        meta: {
          title: "位置变动报表",
          hidden: false,
          icon: "Document",
          roles: ["ADMIN", "OPERATOR"],
          requiresAuth: true,
        },
      },
      {
        path: "/report/OnShelf",
        component: () => import("@/views/Report/OnShelf/index.vue"),
        name: "OnShelf",
        meta: {
          title: "图书上架报表",
          hidden: false,
          icon: "Document",
          roles: ["ADMIN", "OPERATOR"],
          requiresAuth: true,
        },
      },
      {
        path: "/report/BookWeeding",
        component: () => import("@/views/Report/BookWeeding/index.vue"),
        name: "BookWeeding",
        meta: {
          title: "图书剔旧报表",
          hidden: false,
          icon: "Document",
          roles: ["ADMIN", "OPERATOR"],
          requiresAuth: true,
        },
      },
      {
        path: "/report/BookChangeShelf",
        component: () => import("@/views/Report/BookChangeShelf/index.vue"),
        name: "BookChangeShelf",
        meta: {
          title: "图书倒架报表",
          hidden: false,
          icon: "Document",
          roles: ["ADMIN", "OPERATOR"],
          requiresAuth: true,
        },
      },
      {
        path: "/report/PublicSentiment",
        component: () => import("@/views/Report/PublicSentiment/index.vue"),
        name: "Weeding",
        meta: {
          title: "图书舆情报表",
          hidden: false,
          icon: "Document",
          roles: ["ADMIN", "OPERATOR"],
          requiresAuth: true,
        },
      },
      {
        path: "/report/BookReport",
        component: () => import("@/views/reutrn-box/BookReport.vue"),
        name: "BookReport",
        meta: {
          title: "图书频次报表",
          hidden: false,
          roles: ["ADMIN", "OPERATOR"],
          requiresAuth: true,
        },
      },
      {
        path: "/report/taskReport",
        component: () => import("@/views/reutrn-box/taskReport.vue"),
        name: "taskReport",
        meta: {
          title: "图书统计报表",
          hidden: false,
          roles: ["ADMIN", "OPERATOR"],
          requiresAuth: true,
        },
      },
      {
        path: "/report/abnormal",
        component: () => import("@/views/Report/Abnormal/index.vue"),
        name: "Abnormal",
        meta: {
          title: "图书异常报表",
          hidden: false,
          icon: "Document",
          roles: ["ADMIN", "OPERATOR"],
          requiresAuth: true,
        },
      },
    ],
  },

  {
    path: "/log",
    component: () => import("@/layout/index.vue"),
    name: "LogSystem",
    redirect: "/log/system",
    meta: {
      title: "日志管理",
      hidden: false,
    },
    children: [
      // {
      //   path: "/log/loginLog",
      //   component: () => import("@/views/Log/loginLog/index.vue"),
      //   name: "Log",
      //   meta: {
      //     title: "登录日志",
      //     hidden: false,
      //     roles: ["ADMIN", "LIBRARY_ROOT", "OPERATOR"],
      //     requiresAuth: true,
      //   },
      // },
      {
        path: "/log/system",
        component: () => import("@/views/Log/System/index.vue"),
        name: "System",
        meta: {
          title: "系统日志",
          hidden: false,
          roles: ["ADMIN", "LIBRARY_ROOT", "OPERATOR"],
          requiresAuth: true,
        },
      },
      {
        path: "/log/bus",
        component: () => import("@/views/Log/Bus/index.vue"),
        name: "Bus",
        meta: {
          title: "业务日志",
          hidden: false,
          roles: ["ADMIN", "LIBRARY_ROOT", "OPERATOR"],
          requiresAuth: true,
        },
      },
    ],
  },

  {
    //404
    path: "/404",
    component: () => import("@/views/404/index.vue"),
    name: "404",
    meta: {
      title: "404",
      hidden: true,
      icon: "DocumentDelete",
      roles: ["ADMIN", "LIBRARY_ROOT", "OPERATOR"],
      requiresAuth: true,
    },
  },
  {
    //任意路由
    path: "/:pathMatch(.*)*",
    redirect: "/404",
    name: "Any",
    meta: {
      title: "任意路由",
      hidden: true,
      icon: "DataLine",
      roles: ["ADMIN", "LIBRARY_ROOT", "OPERATOR"],
      requiresAuth: true,
    },
  },
  {
    path: "/lms",
    component: () => import("@/layout/index.vue"),
    name: "LMS",
    redirect: "/lms/supplier",
    meta: {
      title: "LMS集成管理",
      hidden: false,
    },
    children: [
      {
        path: "/lms/supplier",
        component: () => import("@/views/LMS/supplier.vue"),
        name: "system",
        meta: {
          title: "LMS供应商管理",
          hidden: false,
          roles: ["LIBRARY_ROOT"],
          requiresAuth: true,
        },
      },
      {
        path: "/lms/Interface",
        component: () => import("@/views/LMS/Interface.vue"),
        name: "Interface",
        meta: {
          title: "LMS接口配置",
          hidden: false,
          roles: ["LIBRARY_ROOT"],
          requiresAuth: true,
        },
      },
      {
        path: "/lms/hisquery",
        component: () => import("@/views/LMS/hisquery‌.vue"),
        name: "HisQuery",
        meta: {
          title: "LMS接口历史查询",
          hidden: false,
          roles: ["LIBRARY_ROOT"],
          requiresAuth: true,
        },
      },
    ],
  },
  {
    path: "/synclog",
    component: () => import("@/layout/index.vue"),
    name: "Synclog",
    redirect: "/synclog/itrfaces",
    meta: {
      title: "图书管理系统对接",
      hidden: false,
    },
    children: [
      {
        path: "/synclog/itrfaces",
        component: () => import("@/views/synclog/itrfaces.vue"),
        name: "Itrfaces",
        meta: {
          title: "接口配置",
          hidden: false,
          roles: ["LIBRARY_ROOT"],
          requiresAuth: true,
        },
      },
      {
        path: "/synclog/hislog",
        component: () => import("@/views/synclog/hislog.vue"),
        name: "Log",
        meta: {
          title: "接口历史查询",
          hidden: false,
          roles: ["LIBRARY_ROOT"],
          requiresAuth: true,
        },
      },
    ],
  },

  // {
  //   path: "/box",
  //   component: () => import("@/layout/index.vue"),
  //   redirect: "/box/boxrobot/agv",
  //   name: "box",
  //   meta: {
  //     title: "还书箱",
  //     hidden: false,
  //   },
  //   children: [
  //     {
  //       path: "boxrobot",
  //       component: () => import("@/views/reutrn-box/boxrobot.vue"),
  //       name: "boxrobot",

  //       meta: {
  //         title: "机器人管理",
  //         hidden: false,
  //         requiresAuth: true,
  //       },
  //       redirect: "agv",
  //       children: [
  //         {
  //           path: "agv",
  //           component: () => import("@/views/reutrn-box/agv.vue"),
  //           name: "agv",
  //           meta: {
  //             title: "图书复位机器人管理",
  //             hidden: false,
  //             requiresAuth: true,
  //           },
  //         },
  //         {
  //           path: "returnbox",
  //           component: () => import("@/views/reutrn-box/returnbox.vue"),
  //           name: "returnbox",
  //           meta: {
  //             title: "智能还书箱管理",
  //             hidden: false,
  //             requiresAuth: true,
  //           },
  //         },
  //         {
  //           path: "returnTask",
  //           component: () => import("@/views/reutrn-box/returnTask.vue"),
  //           name: "returnTask",
  //           meta: {
  //             title: "还书任务",
  //             hidden: false,
  //             requiresAuth: true,
  //           },
  //         },
  //       ],
  //     },
  //     {
  //       path: "reportRouter",
  //       component: () => import("@/views/reutrn-box/reportRouter.vue"),
  //       name: "reportRouter",
  //       meta: {
  //         title: "报表管理",
  //         hidden: false,
  //         requiresAuth: true,
  //       },
  //       redirect: "BookReport",
  //       children: [
  //         {
  //           path: "BookReport",
  //           component: () => import("@/views/reutrn-box/BookReport.vue"),
  //           name: "BookReport",
  //           meta: {
  //             title: "图书频次报表",
  //             hidden: false,
  //             requiresAuth: true,
  //           },
  //         },
  //         {
  //           path: "taskReport",
  //           component: () => import("@/views/reutrn-box/taskReport.vue"),
  //           name: "taskReport",
  //           meta: {
  //             title: "图书统计报表",
  //             hidden: false,
  //             requiresAuth: true,
  //           },
  //         },
  //       ],
  //     },
  //   ],
  // },
];
